package collection;

import sun.plugin.javascript.navig.Link;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public class SortString {
    public static void main(String[] args) {
        List<String>list = new ArrayList<>();
        /*list.add("jerry");
        list.add("tom");
        list.add("rose");
        list.add("black");
        list.add("Kobe");
        list.add("Devi");
        System.out.println(list);
        Collections.sort(list);
        System.out.println(list);

         */
        list.add("克晶");
        list.add("传奇");
        list.add("伟超");
        System.out.println(list);
        Collections.sort(list);
        System.out.println(list);
        Collections.sort(list,(o1 , o2) -> o2.length() - o1.length());
        System.out.println(list);

    }
}
